3.79 \(\int \frac {(e x)^{-1+n}}{a+b \text {sech}(c+d x^n)} \, dx\)

Optimal. Leaf size=87 \[ \frac {(e x)^n}{a e n}-\frac {2 b x^{-n} (e x)^n \tan ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a+b}}\right )}{a d e n \sqrt {a-b} \sqrt {a+b}} \]

[Out]

(e*x)^n/a/e/n-2*b*(e*x)^n*arctan((a-b)^(1/2)*tanh(1/2*c+1/2*d*x^n)/(a+b)^(1/2))/a/d/e/n/(x^n)/(a-b)^(1/2)/(a+b
)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.227, Rules used = {5440, 5436, 3783, 2659, 208} \[ \frac {(e x)^n}{a e n}-\frac {2 b x^{-n} (e x)^n \tan ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a+b}}\right )}{a d e n \sqrt {a-b} \sqrt {a+b}} \]

Antiderivative was successfully verified.

[In]

Int[(e*x)^(-1 + n)/(a + b*Sech[c + d*x^n]),x]

[Out]

(e*x)^n/(a*e*n) - (2*b*(e*x)^n*ArcTan[(Sqrt[a - b]*Tanh[(c + d*x^n)/2])/Sqrt[a + b]])/(a*Sqrt[a - b]*Sqrt[a +
b]*d*e*n*x^n)

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 2659

Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[(2*e)/d, Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]

Rule 3783

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(-1), x_Symbol] :> Simp[x/a, x] - Dist[1/a, Int[1/(1 + (a*Sin[c + d
*x])/b), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]

Rule 5436

Int[(x_)^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simpli
fy[(m + 1)/n] - 1)*(a + b*Sech[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplif
y[(m + 1)/n], 0] && IntegerQ[p]

Rule 5440

Int[((e_)*(x_))^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[(e^IntPart[m]*(e*
x)^FracPart[m])/x^FracPart[m], Int[x^m*(a + b*Sech[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]

Rubi steps

\begin {align*} \int \frac {(e x)^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx &=\frac {\left (x^{-n} (e x)^n\right ) \int \frac {x^{-1+n}}{a+b \text {sech}\left (c+d x^n\right )} \, dx}{e}\\ &=\frac {\left (x^{-n} (e x)^n\right ) \operatorname {Subst}\left (\int \frac {1}{a+b \text {sech}(c+d x)} \, dx,x,x^n\right )}{e n}\\ &=\frac {(e x)^n}{a e n}-\frac {\left (x^{-n} (e x)^n\right ) \operatorname {Subst}\left (\int \frac {1}{1+\frac {a \cosh (c+d x)}{b}} \, dx,x,x^n\right )}{a e n}\\ &=\frac {(e x)^n}{a e n}+\frac {\left (2 i x^{-n} (e x)^n\right ) \operatorname {Subst}\left (\int \frac {1}{1+\frac {a}{b}+\left (1-\frac {a}{b}\right ) x^2} \, dx,x,i \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}{a d e n}\\ &=\frac {(e x)^n}{a e n}-\frac {2 b x^{-n} (e x)^n \tan ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a+b}}\right )}{a \sqrt {a-b} \sqrt {a+b} d e n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.15, size = 80, normalized size = 0.92 \[ \frac {(e x)^n \left (\frac {2 b x^{-n} \tan ^{-1}\left (\frac {(b-a) \tanh \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+c x^{-n}+d\right )}{a d e n} \]

Antiderivative was successfully verified.

[In]

Integrate[(e*x)^(-1 + n)/(a + b*Sech[c + d*x^n]),x]

[Out]

((e*x)^n*(d + c/x^n + (2*b*ArcTan[((-a + b)*Tanh[(c + d*x^n)/2])/Sqrt[a^2 - b^2]])/(Sqrt[a^2 - b^2]*x^n)))/(a*
d*e*n)

________________________________________________________________________________________

fricas [B]  time = 0.44, size = 511, normalized size = 5.87 \[ \left [\frac {{\left (a^{2} - b^{2}\right )} d \cosh \left ({\left (n - 1\right )} \log \relax (e)\right ) \cosh \left (n \log \relax (x)\right ) + {\left (a^{2} - b^{2}\right )} d \cosh \left (n \log \relax (x)\right ) \sinh \left ({\left (n - 1\right )} \log \relax (e)\right ) - {\left (\sqrt {-a^{2} + b^{2}} b \cosh \left ({\left (n - 1\right )} \log \relax (e)\right ) + \sqrt {-a^{2} + b^{2}} b \sinh \left ({\left (n - 1\right )} \log \relax (e)\right )\right )} \log \left (\frac {a b + {\left (b^{2} + \sqrt {-a^{2} + b^{2}} b\right )} \cosh \left (d \cosh \left (n \log \relax (x)\right ) + d \sinh \left (n \log \relax (x)\right ) + c\right ) + {\left (a^{2} - b^{2} - \sqrt {-a^{2} + b^{2}} b\right )} \sinh \left (d \cosh \left (n \log \relax (x)\right ) + d \sinh \left (n \log \relax (x)\right ) + c\right ) + \sqrt {-a^{2} + b^{2}} a}{a \cosh \left (d \cosh \left (n \log \relax (x)\right ) + d \sinh \left (n \log \relax (x)\right ) + c\right ) + b}\right ) + {\left ({\left (a^{2} - b^{2}\right )} d \cosh \left ({\left (n - 1\right )} \log \relax (e)\right ) + {\left (a^{2} - b^{2}\right )} d \sinh \left ({\left (n - 1\right )} \log \relax (e)\right )\right )} \sinh \left (n \log \relax (x)\right )}{{\left (a^{3} - a b^{2}\right )} d n}, \frac {{\left (a^{2} - b^{2}\right )} d \cosh \left ({\left (n - 1\right )} \log \relax (e)\right ) \cosh \left (n \log \relax (x)\right ) + {\left (a^{2} - b^{2}\right )} d \cosh \left (n \log \relax (x)\right ) \sinh \left ({\left (n - 1\right )} \log \relax (e)\right ) + 2 \, {\left (\sqrt {a^{2} - b^{2}} b \cosh \left ({\left (n - 1\right )} \log \relax (e)\right ) + \sqrt {a^{2} - b^{2}} b \sinh \left ({\left (n - 1\right )} \log \relax (e)\right )\right )} \arctan \left (-\frac {\sqrt {a^{2} - b^{2}} a \cosh \left (d \cosh \left (n \log \relax (x)\right ) + d \sinh \left (n \log \relax (x)\right ) + c\right ) + \sqrt {a^{2} - b^{2}} a \sinh \left (d \cosh \left (n \log \relax (x)\right ) + d \sinh \left (n \log \relax (x)\right ) + c\right ) + \sqrt {a^{2} - b^{2}} b}{a^{2} - b^{2}}\right ) + {\left ({\left (a^{2} - b^{2}\right )} d \cosh \left ({\left (n - 1\right )} \log \relax (e)\right ) + {\left (a^{2} - b^{2}\right )} d \sinh \left ({\left (n - 1\right )} \log \relax (e)\right )\right )} \sinh \left (n \log \relax (x)\right )}{{\left (a^{3} - a b^{2}\right )} d n}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)/(a+b*sech(c+d*x^n)),x, algorithm="fricas")

[Out]

[((a^2 - b^2)*d*cosh((n - 1)*log(e))*cosh(n*log(x)) + (a^2 - b^2)*d*cosh(n*log(x))*sinh((n - 1)*log(e)) - (sqr
t(-a^2 + b^2)*b*cosh((n - 1)*log(e)) + sqrt(-a^2 + b^2)*b*sinh((n - 1)*log(e)))*log((a*b + (b^2 + sqrt(-a^2 +
b^2)*b)*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + (a^2 - b^2 - sqrt(-a^2 + b^2)*b)*sinh(d*cosh(n*log(x))
 + d*sinh(n*log(x)) + c) + sqrt(-a^2 + b^2)*a)/(a*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + b)) + ((a^2
- b^2)*d*cosh((n - 1)*log(e)) + (a^2 - b^2)*d*sinh((n - 1)*log(e)))*sinh(n*log(x)))/((a^3 - a*b^2)*d*n), ((a^2
 - b^2)*d*cosh((n - 1)*log(e))*cosh(n*log(x)) + (a^2 - b^2)*d*cosh(n*log(x))*sinh((n - 1)*log(e)) + 2*(sqrt(a^
2 - b^2)*b*cosh((n - 1)*log(e)) + sqrt(a^2 - b^2)*b*sinh((n - 1)*log(e)))*arctan(-(sqrt(a^2 - b^2)*a*cosh(d*co
sh(n*log(x)) + d*sinh(n*log(x)) + c) + sqrt(a^2 - b^2)*a*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + sqrt(
a^2 - b^2)*b)/(a^2 - b^2)) + ((a^2 - b^2)*d*cosh((n - 1)*log(e)) + (a^2 - b^2)*d*sinh((n - 1)*log(e)))*sinh(n*
log(x)))/((a^3 - a*b^2)*d*n)]

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (e x\right )^{n - 1}}{b \operatorname {sech}\left (d x^{n} + c\right ) + a}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)/(a+b*sech(c+d*x^n)),x, algorithm="giac")

[Out]

integrate((e*x)^(n - 1)/(b*sech(d*x^n + c) + a), x)

________________________________________________________________________________________

maple [C]  time = 0.56, size = 317, normalized size = 3.64 \[ \frac {x \,{\mathrm e}^{\frac {\left (-1+n \right ) \left (-i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )+i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2}+i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2}-i \pi \mathrm {csgn}\left (i e x \right )^{3}+2 \ln \relax (x )+2 \ln \relax (e )\right )}{2}}}{a n}-\frac {2 b \,{\mathrm e}^{-\frac {i \pi n \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )}{2}} {\mathrm e}^{\frac {i \pi n \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2}}{2}} {\mathrm e}^{\frac {i \pi n \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2}}{2}} {\mathrm e}^{-\frac {i \pi n \mathrm {csgn}\left (i e x \right )^{3}}{2}} {\mathrm e}^{\frac {i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )}{2}} {\mathrm e}^{-\frac {i \pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2}}{2}} {\mathrm e}^{-\frac {i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2}}{2}} {\mathrm e}^{\frac {i \pi \mathrm {csgn}\left (i e x \right )^{3}}{2}} e^{n} {\mathrm e}^{c} \arctan \left (\frac {2 a \,{\mathrm e}^{2 c +d \,x^{n}}+2 \,{\mathrm e}^{c} b}{2 \sqrt {a^{2} {\mathrm e}^{2 c}-b^{2} {\mathrm e}^{2 c}}}\right )}{a n e d \sqrt {a^{2} {\mathrm e}^{2 c}-b^{2} {\mathrm e}^{2 c}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x)^(-1+n)/(a+b*sech(c+d*x^n)),x)

[Out]

1/a/n*x*exp(1/2*(-1+n)*(-I*Pi*csgn(I*e)*csgn(I*x)*csgn(I*e*x)+I*Pi*csgn(I*e)*csgn(I*e*x)^2+I*Pi*csgn(I*x)*csgn
(I*e*x)^2-I*Pi*csgn(I*e*x)^3+2*ln(x)+2*ln(e)))-2/a*b/n*exp(-1/2*I*Pi*n*csgn(I*e)*csgn(I*x)*csgn(I*e*x))*exp(1/
2*I*Pi*n*csgn(I*e)*csgn(I*e*x)^2)*exp(1/2*I*Pi*n*csgn(I*x)*csgn(I*e*x)^2)*exp(-1/2*I*Pi*n*csgn(I*e*x)^3)*exp(1
/2*I*Pi*csgn(I*e)*csgn(I*x)*csgn(I*e*x))*exp(-1/2*I*Pi*csgn(I*e)*csgn(I*e*x)^2)*exp(-1/2*I*Pi*csgn(I*x)*csgn(I
*e*x)^2)*exp(1/2*I*Pi*csgn(I*e*x)^3)*e^n/e*exp(c)/d/(a^2*exp(2*c)-b^2*exp(2*c))^(1/2)*arctan(1/2*(2*a*exp(2*c+
d*x^n)+2*exp(c)*b)/(a^2*exp(2*c)-b^2*exp(2*c))^(1/2))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ -2 \, b e^{n} \int \frac {e^{\left (d x^{n} + n \log \relax (x) + c\right )}}{a^{2} e x e^{\left (2 \, d x^{n} + 2 \, c\right )} + 2 \, a b e x e^{\left (d x^{n} + c\right )} + a^{2} e x}\,{d x} + \frac {e^{n - 1} x^{n}}{a n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)/(a+b*sech(c+d*x^n)),x, algorithm="maxima")

[Out]

-2*b*e^n*integrate(e^(d*x^n + n*log(x) + c)/(a^2*e*x*e^(2*d*x^n + 2*c) + 2*a*b*e*x*e^(d*x^n + c) + a^2*e*x), x
) + e^(n - 1)*x^n/(a*n)

________________________________________________________________________________________

mupad [B]  time = 2.10, size = 409, normalized size = 4.70 \[ \frac {x\,{\left (e\,x\right )}^{n-1}}{a\,n}-\frac {\left (2\,\mathrm {atan}\left (\frac {a^2\,{\mathrm {e}}^{d\,x^n}\,{\mathrm {e}}^c\,\left (\frac {2\,b\,x\,{\left (e\,x\right )}^{n-1}}{a^4\,d\,n\,x^n\,\sqrt {b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}+\frac {2\,b\,d\,n\,x^n\,{\left (e\,x\right )}^{1-n}\,\sqrt {b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}{a^2\,x\,\sqrt {a^4\,d^2\,n^2\,x^{2\,n}-a^2\,b^2\,d^2\,n^2\,x^{2\,n}}\,\sqrt {a^2\,d^2\,n^2\,x^{2\,n}\,\left (a^2-b^2\right )}}\right )\,\sqrt {a^4\,d^2\,n^2\,x^{2\,n}-a^2\,b^2\,d^2\,n^2\,x^{2\,n}}}{2}+\frac {a\,d\,n\,x^n\,{\left (e\,x\right )}^{1-n}\,\sqrt {b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}{x\,\sqrt {a^2\,d^2\,n^2\,x^{2\,n}\,\left (a^2-b^2\right )}}\right )+2\,\mathrm {atan}\left (\frac {x\,{\left (e\,x\right )}^{n-1}\,\sqrt {a^2\,d^2\,n^2\,x^{2\,n}\,\left (a^2-b^2\right )}}{a\,d\,n\,x^n\,\sqrt {b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}\right )\right )\,\sqrt {b^2\,x^2\,{\left (e\,x\right )}^{2\,n-2}}}{\sqrt {a^4\,d^2\,n^2\,x^{2\,n}-a^2\,b^2\,d^2\,n^2\,x^{2\,n}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x)^(n - 1)/(a + b/cosh(c + d*x^n)),x)

[Out]

(x*(e*x)^(n - 1))/(a*n) - ((2*atan((a^2*exp(d*x^n)*exp(c)*((2*b*x*(e*x)^(n - 1))/(a^4*d*n*x^n*(b^2*x^2*(e*x)^(
2*n - 2))^(1/2)) + (2*b*d*n*x^n*(e*x)^(1 - n)*(b^2*x^2*(e*x)^(2*n - 2))^(1/2))/(a^2*x*(a^4*d^2*n^2*x^(2*n) - a
^2*b^2*d^2*n^2*x^(2*n))^(1/2)*(a^2*d^2*n^2*x^(2*n)*(a^2 - b^2))^(1/2)))*(a^4*d^2*n^2*x^(2*n) - a^2*b^2*d^2*n^2
*x^(2*n))^(1/2))/2 + (a*d*n*x^n*(e*x)^(1 - n)*(b^2*x^2*(e*x)^(2*n - 2))^(1/2))/(x*(a^2*d^2*n^2*x^(2*n)*(a^2 -
b^2))^(1/2))) + 2*atan((x*(e*x)^(n - 1)*(a^2*d^2*n^2*x^(2*n)*(a^2 - b^2))^(1/2))/(a*d*n*x^n*(b^2*x^2*(e*x)^(2*
n - 2))^(1/2))))*(b^2*x^2*(e*x)^(2*n - 2))^(1/2))/(a^4*d^2*n^2*x^(2*n) - a^2*b^2*d^2*n^2*x^(2*n))^(1/2)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (e x\right )^{n - 1}}{a + b \operatorname {sech}{\left (c + d x^{n} \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)**(-1+n)/(a+b*sech(c+d*x**n)),x)

[Out]

Integral((e*x)**(n - 1)/(a + b*sech(c + d*x**n)), x)

________________________________________________________________________________________